package cn.hwadee.muying.commons.utils;

import cn.hwadee.muying.commons.mail.sender.Sender;
import cn.hwadee.muying.entity.Mail;
import cn.hwadee.muying.entity.MailMessage;

/**
 * Created by 1 on 2018/8/14.
 */
public class SendMail {
    private static Mail mail=new Mail();

    public static boolean sendMail(String receiver,String organization, String content){
        MailMessage mailMessage = new MailMessage();
        mailMessage.setBuyerEmail(receiver);
        mail.setSendMail("2807802406@qq.com");
        mail.setSendMailAuthCode("lriohcwfwiyldcfi");
        Sender sender=new Sender(mail,mailMessage);
        try{
            sender.send(organization, content);
            return true;
        }catch (Exception e){
            return false;
        }
    }
}
